<script setup>
    const emits = defineEmits(['getMessage'])
    const sendMessage = () => {
        emits('getMessage', 'hello world!')
    }
</script>

<template>
    <button @click="sendMessage">发送</button>
</template>